package com.xlabs.client;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * TimedCommentServiceAsync interface.
 */
public interface CommentingServiceAsync {
    /**
     * Posts comment for a video.
     * @param comment comment text.
     * @param time time of comment.
     * @param async async callback.
     * @param currentVideoId video id.
     * @return All comments posted so far for the video.
     */
    public void postQuestion(String comment, double time, String currentVideoId, AsyncCallback async);

    /**
     * Gets all comments for the given video. 
     * @param async async callback.
     * @param currentVideoId video id.
     */
    public void getQuestions(String currentVideoId, AsyncCallback async);

    /**
     * Posts a reply for a question.
     * @param reply reply.
     * @param questionKey question key.
     * @param async async callback.
     */
    public void postReply(String reply, String questionKey, AsyncCallback async);


    /**
     * Gets the conversation related to the question given.
     * @param parentEncodedKey question's key.
     * @param async Async callback.
     */
    public void getConversation(String parentEncodedKey, AsyncCallback async);
}
